	<!--显示数据-->
	<div class='line'>
		<div class='x12'>
			<table class='table Service_list'>
				<tr>
					<th width='120px'><input type='checkbox' name='CheckAll' /> 全选/取消</th>
					<th>一级导航名</th>
					<th>地址</th>
					<th>排序等级</th>
					<th>操作</th>
				</tr>
				<volist name='data_nav2.list' id='vo'>
					<tr>
						<td>
							<input type='checkbox' name='Nids' value='{$vo.nav2_id}' />
						</td>
						<td>{$vo.nav2_name}</td>
						<td>{$vo.nav2_addr}</td>
						<td>{$vo.nav2_order}</td>
						<td>
							<a class='button button-little bg-sub Nav2Del' data='{$vo.nav2_id}'>删除</a>
						</td>
					</tr>
				</volist>
			</table>			
		</div>
		<if condition="$data_nav2_count gt 0">
			<div class='x2'><a class='button button-little bg-red Nav2Dels'><span class='icon-trash-o'></span> 删除选中</a></div>
		</if>
	</div>

	<!--显示分页
	<div class='line margin-large'>
		<if condition="$data_nav2_count gt 0">
			<div class='x12  text-center' id='admin_nav2_list_fpage'>
				{$data_nav2['fpage']}
			</div>
		</if>
	</div>-->

	<script>
		$(function(){

			$('#admin_nav2_list_fpage  a').click(function(){
				$.ajax({
					url:'admin_nav2_list',
					data:{
						pnow:$(this).attr('pnow'),
						nav2_parent:sessionStorage.Nav1_Current_Id
					},
					success:function(res){
						$('#admin_nav2_list').html(res);
					}
				});
			});

		//-- 全选|取消
			$('input[name=CheckAll]').change(function(){
				if($(this).is(':checked')){
					$('input[name=Nids]').each(function(){
						this.checked=true;
					});
				}else{
					$('input[name=Nids]').attr('checked',false);
				}
			});

		//-- 多选删除 
			$('.Nav2Dels').click(function(){
				if(!confirm('确认删除选中?')){
					exit;
				}
				var arr = [];
				$('input[name=Nids]').each(function(){
					if(this.checked==true){
						arr.push($(this).val());
					}
				});
				var arr_str = arr.join(',');
				$.ajax({
					url:'/admin.php/Admin/ModelNav2/Nav2_Del',
					data:{
						nid:arr_str,
					},
					type:'post',
					success:function(res){
						if(res > 0){
							alert('删除成功！');
							location.reload(true);
						}else{
							alert('删除失败！');
						}
					}
				});
			});


		//-- 单选删除 
			$('.Nav2Del').click(function(){
				if(!confirm('确认删除?')){
					exit;
				}
				var nid = $(this).attr('data');
				$.ajax({
					url:'/admin.php/Admin/ModelNav2/Nav2_Del',
					data:{
						nid:nid,
					},
					type:'post',
					success:function(res){
						if(res > 0){
							alert('删除成功！');
							location.reload(true);
						}else{
							alert('删除失败！');
						}
					}
				});
			});

		});
	</script>